package test.tabs;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class TabsActivity extends Activity implements View.OnClickListener{
    /** Called when the activity is first created. */
	static Context cxt;
	static int car=12;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        cxt=this;
        System.out.println(1);
        car++;
        Toast.makeText(this, "TOAST ME "+car+" TIMES PLEASE", Toast.LENGTH_SHORT).show();

        System.out.println(2);
        View v = findViewById(R.id.button1);
        v.setOnClickListener(this);
        /*try {

            System.out.println(3);
			wait(2000);

	        System.out.println(4);
			setContentView(R.layout.otherlayout);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
    }

	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		Intent tent = new Intent(this, otherlayoutActivity.class);
		car++;
		tent.putExtra("THE TRUCK", car);
		//tent.
		cxt.startActivity(tent);
		//setContentView(R.layout.otherlayout);
	}
}